<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用BFC阻止元素被浮动元素覆盖</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .floatDiv {
            width: 100px;
            height: 100px;
            background-color: blue;
            float: left;
        }

        .normalDiv {
            width: 200px;
            height: 200px;
            background-color: red;
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div class="floatDiv"></div>
    <div class="normalDiv"></div>
</body>

</html>